<div class="stat-container">
    <div class="stat-condition">
        <button pButton type="button" label="高级搜索" class="ui-button-warn" (click)="showSearchDialog($event)"
            style="float:right;margin-left: 20px;padding-bottom:1px;"></button>
        <div class="ui-inputgroup" style="float:right">
            <input type="text" [(ngModel)]="searchCriteria.name" pInputText placeholder="输入事件名称以搜索"
                style="width:300px;">
            <button pButton type="button" icon="fa fa-search" label="搜索" class="ui-button-warn" (click)="search()"></button>
        </div>
    </div>
    <div class="stat-container">
        <div class="container-left">
            <p-table [columns]="cols" [value]="items" selectionMode="single" [scrollable]="true" [loading]="loading"
                [scrollHeight]="'calc(100vh - 210px)'" [rows]="30" [lazy]="true" (onLazyLoad)="loadLazy($event)"
                [paginator]="true" [alwaysShowPaginator]="'fasle'" [totalRecords]="totalRecords"
                [(selection)]="selectedRecord">
                <ng-template pTemplate="header" let-columns>
                    <tr style="height: 50px;text-align: center;">
                        <th style="width:60px;">序号</th>
                        <th *ngFor="let col of columns" [ngStyle]="col.style">
                            {{col.header}}
                        </th>
                    </tr>
                </ng-template>
                <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
                    <tr [pSelectableRow]="rowData">
                        <td style="width:60px; text-align: center;">{{rowIndex + 1}}</td>
                        <td *ngFor="let col of columns" [ngStyle]="col.style" (click)="showDetail(rowData)">
                            {{rowData[col.field]}}
                        </td>
                    </tr>
                </ng-template>
                <ng-template pTemplate="paginatorleft" let-state>
                    第{{state.page + 1}} / {{state.totalRecords / state.rows | mathceil}}页
                </ng-template>

                <ng-template pTemplate="paginatorright" let-state>
                    共{{state.totalRecords}}条
                </ng-template>
                <ng-template pTemplate="emptymessage" let-columns>
                    <tr>
                        <td [attr.colspan]="columns.length">
                            无数据
                        </td>
                    </tr>
                </ng-template>
            </p-table>
        </div>
        <div class="container-right">
            <div class="header">{{selectedRecord.yesswNum}}</div>
            <div class="label" style="margin-top:15px;">问题描述</div>
            <div class="content">{{selectedRecord.recordDesc}}</div>
            <div class="label">办理经过</div>
            <div class="content">{{selectedRecord.recordHandleDesc}}</div>
        </div>
    </div>
</div>